package threading;

public class ThreadDemo14 {
    public static void main(String[] args) throws InterruptedException {
        Thread t = new Thread( () -> {
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        });
        //在线程启动前获取t的状态，  NEW
        System.out.println(t.getState());

        t.start();

        Thread.sleep(2000);

        System.out.println(t.getState());
    }
}
